combobox: Make wrap-width and grid mode work again
authorDaniel Boles <dboles@src.gnome.org>
Thu, 19 Jan 2017 21:23:51 +0000 (21:23 +0000)
committerDaniel Boles <dboles@src.gnome.org>
Thu, 19 Jan 2017 22:08:45 +0000 (22:08 +0000)
Commit fdc0c6426b6fb751653f3a8536a344f69a6407ac for removing (partly!)
appears-as-list also deleted the code that propagated wrap-width to the
TreeMenu and thus put us into “grid mode”. This restores that code.

And as Benjamin noted, calling check_appearance() here is wrong, so bye.

gtk/gtkcombobox.c

index 3fb8222d359bc21cff8214c1277bac6ce37827d9..4ca31f4b3f9d32920d21d7a0310d42af3ed5ecb7 100644 (file)
@@ -2775,7 +2775,8 @@ gtk_combo_box_set_wrap_width (GtkComboBox *combo_box,
     {
       priv->wrap_width = width;
 
-      gtk_combo_box_check_appearance (combo_box);
+      if (GTK_IS_TREE_MENU (priv->popup_widget))
+        _gtk_tree_menu_set_wrap_width (GTK_TREE_MENU (priv->popup_widget), priv->wrap_width);
 
       g_object_notify (G_OBJECT (combo_box), "wrap-width");
     }